package com.gitee.wsl.db.dsl

interface I_ColumnFunction<T> {
    fun typeName(): String?
    val columnName: String?
    fun AS(alise: String?): ColumnFunction<*>?
    val alise: String?
    val columnType: T?
}


abstract class ColumnFunction<T>(protected val funcName: String,override val columnName: String? = null) : I_ColumnFunction<T> {

    override var alise: String? = null
        protected set

    override var columnType: T? = null
        protected set

    override fun typeName(): String {
        return this.funcName
    }

    override fun AS(alise: String?): ColumnFunction<T> {
        this.alise = alise
        return this
    }
}
